#

def add(a, b):
    print(a + b)
    return a + b
print(add(2, 3))
print(add)
#
add2 = lambda a, b: a+b
print(add2(2, 3))
print(add2)
print(add2, type(add2))

#
def get_avg(a, b, c):
    return ((a+b+c)/3)
print(get_avg(1, 2, 3))
get_avg2 = lambda a, b, c: (a+b+c)/3
print(get_avg2(1, 2, 3))
nums = 0
nums = map(lambda x: x * 2, nums)
print(list(nums))

#
products = [
    {
        'title':'iphone15',
        'price':5499
    },
    {
        'title': 'huaweiiphone',
        'price': 6377
    },
    {
        'title': 'vivoXX100',
        'price': 3499
    }
]

new_products = []
for item in products:
    print(item['title'], item['price'])
    if 2000 <= item['price'] <= 7000:
        print(item)
        new_products.append(item)
print(new_products)
